i2c: bcm2835: Can't support I2C_M_IGNORE_NAK
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 22 Sep 2016 20:05:50 +0000 (22:05 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 01:00:01 +0000 (01:00 +0000)
commit5adcc072cff0036e3f9c6764c232d14917a1e5f3
treede86f4b32470dd07f9de2c0194b0179d28a82d27
parent385da03440781c03580bce9cb7bf84ecaad5b539
i2c: bcm2835: Can't support I2C_M_IGNORE_NAK

The controller can't support this flag, so remove it.

Documentation/i2c/i2c-protocol states that all of the message is sent:

I2C_M_IGNORE_NAK:
    Normally message is interrupted immediately if there is [NA] from the
    client. Setting this flag treats any [NA] as [A], and all of
    message is sent.

From the BCM2835 ARM Peripherals datasheet:

    The ERR field is set when the slave fails to acknowledge either
    its address or a data byte written to it.

So when the controller doesn't receive an ack, it sets ERR and raises
an interrupt. In other words, the whole message is not sent.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
drivers/i2c/busses/i2c-bcm2835.c